<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>键盘事件</title>
</head>
<body>
    <div id="yun9">
        <input v-model="info" v-on:keyup.tab="msg"/><br/>
        <input v-model="info" @keyup.enter="msg"/><br/>
        <hr/>
        您输入了:<span v-text="info"></span>
    </div>
    <script src="../node_modules/vue/dist/vue.js"></script>
    <script>
        let app = new Vue({
            el:"#yun9",
            data:{
                info:""
            },
            methods:{
                msg(){
                    alert(this.info);
                }
            }
        });
    </script>
</body>
</html>